package day3.demo3_线程中断;

import java.util.Date;

public class A implements Runnable {
    @Override
    public void run() {
        while (true){
            System.out.println(Thread.currentThread().getName()+"当前时间："+new Date());
            Thread.yield();
//            try {
////                Thread.sleep(200);
//            } catch (InterruptedException e) {
//                System.out.println("线程中断已收到");
//                return;
//            }
        }
    }
}
